pyhton return annonymous object

31

>>> obj = type('',(object,),{"foo": 1})()
>>> obj.foo
1

Comments

Submit
0 Comments